<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title>Roster</title>
        <link href="css/global.css" rel="stylesheet" type="text/css" />
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <script src="js/global.js"></script>

        <!-- jquery DataTable !-->
        <h:outputStylesheet name="DataTables-1.9.4/media/css/jquery.dataTables.css"/>
        <h:outputScript name="DataTables-1.9.4/media/js/jquery.js"/>
        <h:outputScript name="DataTables-1.9.4/media/js/jquery.dataTables.js"/>
        <script language="javascript">
            $(document).ready(function(){
                $("[class$='dataTable']").dataTable();
                $("div.navy").load("../navy.xhtml");
            });
        </script>
    </h:head>
    <h:body>
        <div id="background">
            <div class="navy"></div>
            <div id="content">
                <div id="joinLeagueDiv">
                    <span class="whiteHeader">My League List</span><br/><br/>
                    <f:view>
                        <h:form>
                            <h:dataTable binding="#{accountBean.leagueDataTable}" class="dataTable" value="#{accountBean.myLeagues}" var="item">
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="LeagueName"/>
                                    </f:facet>
                                    <h:commandLink value="#{item.leagueName}" action="#{accountBean.selectCurrentLeague()}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="LeagueNote"/>
                                    </f:facet>
                                    <h:outputText value="#{item.leagueNote}"/>
                                </h:column>
                                <h:column>d
                                    <f:facet name="header">
                                        <h:outputText value="MaximumNumberOfUsers"/>
                                    </f:facet>
                                    <h:outputText value="#{item.maximumNumberOfUsers}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="CurrentNumberOfUsers"/>
                                    </f:facet>
                                    <h:outputText value="#{item.currentNumberOfUsers}"/>
                                </h:column>
                                          <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="DraftDate"/>
                                    </f:facet>
                                    <h:outputText value="#{item.draftDate}">
                                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                                    </h:outputText>
                                </h:column>

                            </h:dataTable>
                        </h:form>
                    </f:view>
                </div>
            </div>
        </div>
    </h:body>
</html>
